package com.workcell.workdata.xthings.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @Author 廖博文
 * @Date 2022/11/30 09:59
 * @Description
 */
public interface CodeChainnumVo {

    @Data
    class SaveChainNumVo {

        @NotEmpty(message = "硬件基本信息ID不能为空")
        @ApiModelProperty(value = "硬件基本信息ID")
        private String baseId;

        @NotEmpty(message = "厂家设备编号不能为空")
        @ApiModelProperty(value = "厂家设备编号")
        private String deviceNo;

        @NotEmpty(message = "硬件类型不能为空")
        @ApiModelProperty(value = "硬件类型")
        private String hardwareType;

        @NotEmpty(message = "硬件名称不能为空")
        @ApiModelProperty(value = "硬件名称")
        private String hardwareName;

        @NotEmpty(message = "厂商编码不能为空")
        @ApiModelProperty(value = "厂商编码")
        private String manufacturerCode;

        @ApiModelProperty("机器码")
        private String addressId;

        @ApiModelProperty("MAC地址")
        private String macAddress;

        @ApiModelProperty(value = "备注名称")
        private String alias;

        @ApiModelProperty("cron表达式")
        private String cronExpression;

        @ApiModelProperty(value = "波特率")
        private Integer baudRate;

        @ApiModelProperty(value = "工作模式")
        private String workingMode;

        @ApiModelProperty(value = "发布主题")
        private String publishTopic;

        @ApiModelProperty(value = "订阅主题")
        private String subscribeTopic;

        @ApiModelProperty(value = "通讯数据格式")
        private String commDataFormat;

        @NotEmpty(message = "租户ID不能为空")
        @ApiModelProperty("租户编码（租户ID）")
        private String tenantCode;

        @ApiModelProperty(value="直径")
        private String diameter;

        @ApiModelProperty(value="总体积")
        private String totalVolume;

        @ApiModelProperty("边缘服务器ip")
        private String ip;

        @ApiModelProperty("边缘服务器端口号")
        private String port;

        @ApiModelProperty("打卡机ip")
        private String timeClockIp;

        @ApiModelProperty("打卡机登录用户名")
        private String userName;

        @ApiModelProperty("打卡机登录密码")
        private String password;

    }

    @Data
    class SelectChainNumVo {

        @ApiModelProperty(value = "硬件类型")
        private String hardwareType;

        @ApiModelProperty(value = "关键字查询【设备编号/硬件名称】")
        private String keyWord;
        @ApiModelProperty(value = "备注名称")
        private String alias;
        @ApiModelProperty(value = "设备编码")
        private String deviceNo;
        @ApiModelProperty(value = "查询开始时间")
        private LocalDateTime startTime;

        @ApiModelProperty(value = "查询结束时间")
        private LocalDateTime endTime;

        @ApiModelProperty(value = "使用状态")
        private String useState;

        @ApiModelProperty(value = "分页页数")
        private int pageNum = 1;

        @ApiModelProperty(value = "分页每页个数")
        private int pageSize = 10;
    }

    @Data
    class ExcelExportChainNumVo {

        @NotNull(message = "硬件基本信息ID不能为空")
        @ApiModelProperty(value = "硬件基本信息ID")
        private String baseId;

        @NotNull(message = "硬件类型不能为空")
        @ApiModelProperty(value = "硬件类型")
        private String hardwareType;

        @NotNull(message = "导出数量不能为空")
        @ApiModelProperty(value = "导出数量")
        private int num;

    }

    @Data
    class ExcelImportChainNumResult {

        @ApiModelProperty(value = "硬件基本信息ID")
        private String baseId;

        @ApiModelProperty(value = "厂家设备编号")
        private String deviceNo;

        @ApiModelProperty(value = "硬件名称")
        private String hardwareName;

        @ApiModelProperty(value = "导入结果")
        private Boolean flag;

        @ApiModelProperty(value = "结果说明")
        private String message;
    }

    @Data
    class SelectChainNumDataVo {

        @NotNull(message = "硬件类型不能为空")
        @ApiModelProperty(value = "硬件类型")
        private String hardwareType;
        @NotNull(message = "设备编码不能为空")
        @ApiModelProperty(value = "设备编码")
        private String deviceNo;
        @NotNull(message = "厂商编码不能为空")
        @ApiModelProperty(value = "厂商编码")
        private String manufacturerCode;
        @ApiModelProperty(value = "查询开始时间")
        private LocalDateTime startTime;

        @ApiModelProperty(value = "查询结束时间")
        private LocalDateTime endTime;

        @ApiModelProperty(value = "分页页数")
        private int pageNum = 1;

        @ApiModelProperty(value = "分页每页个数")
        private int pageSize = 10;
    }

    @Data
    @Accessors(chain = true)
    class SelectDeviceInfo {

        @ApiModelProperty(value = "硬件类型")
        private String hardwareType;
        @ApiModelProperty(value = "设备编码")
        private String deviceNo;
        @ApiModelProperty(value = "厂商编码")
        private String manufacturerCode;
        @ApiModelProperty(value = "设备名称")
        private String hardwareName;

        /**
         * 厂商名称
         */
        @ApiModelProperty(value = "厂商名称")
        private String manufacturer;

        /**
         * 产品类型
         */
        @ApiModelProperty(value = "产品类型")
        private String dcProductType;

        /**
         * 型号
         */
        @ApiModelProperty(value = "设备型号")
        private String dcModel;

        @ApiModelProperty(value = "通讯方式")
        private String dcCommunicationMode;

        @ApiModelProperty(value = "波特率")
        private Integer baudRate;

        @ApiModelProperty(value = "备注名称")
        private String alias;

        @ApiModelProperty(value = "通讯数据格式 0无校验 1奇校验 2偶校验")
        private String commDataFormat;

        @ApiModelProperty(value = "设备状态 0未激活；1在线；2下线；3已激活")
        private String useState;

        @ApiModelProperty(value = "机器码")
        private String addressId;

        @ApiModelProperty(value = "激活时间")
        private LocalDateTime activeTime;

        @ApiModelProperty(value = "创建时间")
        private LocalDateTime createTime;

        /**
         * 绑定状态
         */
        @ApiModelProperty(value = "绑定状态")
        private String bindStatus;

        @ApiModelProperty(value = "串口设备名称")
        private String masterDeviceName;

        @ApiModelProperty(value = "串口状态")
        private String masterUseStatus;

        @ApiModelProperty(value = "串口编号")
        private String masterDeviceNo;

        @ApiModelProperty(value = "串口类型")
        private String masterProduct;

        @ApiModelProperty(value = "短链码")
        private String chainNum;

        @ApiModelProperty(value = "看板内容")
        private String panelContent;

        @ApiModelProperty(value = "租户名称")
        private String rentName;
    }
}
